<template>
  <!-- 嵌在组态组件上的iconfont图标 -->
  <foreignObject :data-type="BaseCompType.ConfigureIcon" :x="x" :y="y" :width="size" :height="size" :style="{ cursor }">
    <svg :data-type="BaseCompType.ConfigureIcon" :width="size" :height="size">
      <use :data-type="BaseCompType.ConfigureIcon" :xlink:href="'#' + name" :style="{ fill: color }"></use>
    </svg>
  </foreignObject>
</template>
<script setup lang="ts">
import { BaseCompType } from "/@/components/types";
withDefaults(
  defineProps<{
    x: number;
    y: number;
    size: number;
    name?: string;
    color?: string;
    cursor?: string;
  }>(),
  {
    name: "icon-rotate",
    color: "#333333",
    cursor: "move",
  }
);
</script>
